package com.base.cn.platform.os.controller.user.exprule;


import com.base.cn.platform.os.common.AdminBaseController;
import com.base.cn.platform.os.service.manage.user.exprule.CusExpRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 后台经验记录
 *
 * @author ll
 * @create 2018-04-20
 */
@Controller
@RequestMapping("/admin/user/cus")
public class AdminCusUserExpRecordController extends AdminBaseController {

    @Autowired
    private CusExpRecordService cusExpRecordService;
    /**
     * 搜索个人的经验获取记录
     * @param model
     * @return
     */
    @RequestMapping("/ajax/queryAjaxUserExpRecordList")
    public String queryAjaxUserExpRecordList(Model model,
                                                  @RequestParam(value = "currentPage",required = false,defaultValue = "1")int currentPage,
                                                  @RequestBody Map<String,Object> pamars ){
        Map<String ,Object> dataMap =cusExpRecordService.queryCusUserExpRecordPage(currentPage,pamars,true);
        model.addAttribute("dataMap",dataMap);
        return resultPage("/user/user/user_exp_ajax_record");
    }
}
